<template>
  <div class="index-container">
    <div class="main-header">
      <el-row>
        <el-col :xs="24" :sm="24" :md="6" :lg="6" :xl="6">
          <div class="search">
            <div class="search-title">床位：</div>
            <el-row :gutter="20">
              <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-select
                  v-model="selectForm.politicalStatus"
                  clearable
                  placeholder="楼号"
                  filterable
                  size="medium"
                >
                  <el-option :key="0" label="一号" :value="0"></el-option>
                </el-select>
              </el-col>
              <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-select
                  v-model="selectForm.politicalStatus"
                  clearable
                  placeholder="楼层"
                  filterable
                  size="medium"
                >
                  <el-option :key="0" label="一号" :value="0"></el-option>
                </el-select>
              </el-col>
              <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-select
                  v-model="selectForm.politicalStatus"
                  clearable
                  placeholder="类型"
                  filterable
                  size="medium"
                >
                  <el-option :key="0" label="一号" :value="0"></el-option>
                </el-select>
              </el-col>
            </el-row>
          </div>
        </el-col>
        <el-col :xs="24" :sm="24" :md="18" :lg="18" :xl="18">
          <div class="fr">
            <el-tag
              v-for="tag in tags"
              :key="tag.name"
              :closable="selectArr.includes(tag.id)"
              :color="selectArr.includes(tag.id) ? tag.color : ''"
              size="medium"
              :class="{ active: selectArr.includes(tag.id) }"
              :data-id="tag.id"
              @click="handleFilter"
              @close="handleClose(tag.id)"
            >
              {{ tag.name }}
            </el-tag>
          </div>
        </el-col>
      </el-row>
    </div>
    <div class="card-container">
      <el-row :gutter="30">
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card
            shadow="hover"
            :class="backgroundColor[0]"
            @click.native="handleCardInfo"
          >
            <div slot="header" class="header">
              <vab-icon
                :icon="['fas', icon[0]]"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[1]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', icon[1]]"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[2]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', icon[2]]"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[3]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', icon[3]]"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[4]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', icon[4]]"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[5]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', icon[5]]"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[1]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[0]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[0]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[1]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[2]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[3]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[4]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[5]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[1]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[0]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[0]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[1]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[2]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[3]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[4]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[5]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[1]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :xs="24" :sm="12" :md="6" :lg="4" :xl="3">
          <el-card shadow="hover" :class="backgroundColor[0]">
            <div slot="header" class="header">
              <!-- <vab-remix-icon icon-class="hotel-bed-fill"></vab-remix-icon> -->
              <vab-icon
                :icon="['fas', 'bed']"
                color="#fff"
                class="header_icon"
              ></vab-icon>
              <span>床上有人</span>
            </div>
            <div style="width: 100%; height: 200px">
              <div class="item">
                床位编号：
                <span>101房01床</span>
              </div>
              <div class="item">
                护理类型：
                <span>介助型</span>
              </div>
              <div class="item">
                老人姓名：
                <span>建书城</span>
              </div>
              <div class="item">
                老人性别：
                <span>男</span>
              </div>
              <div class="item">
                老人年龄：
                <span>78</span>
              </div>
              <div class="item">
                实时心率：
                <span>78</span>
              </div>
            </div>
          </el-card>
        </el-col>
      </el-row>
      <el-pagination
        :background="background"
        :current-page="pageNo"
        :layout="layout"
        :page-size="pageSize"
        :total="total"
        @current-change="handleCurrentChange"
        @size-change="handleSizeChange"
      ></el-pagination>
    </div>
    <el-dialog
      title="信息面板"
      :visible.sync="dialogVisible"
      width="60%"
      :before-close="closeDialog"
      :close-on-click-modal="false"
      class="dialogForm"
    >
      <div class="dialog-main">
        <div class="info-title">基本信息</div>
        <div class="basicInfo">
          <div class="item">姓名</div>
          <div class="item">简书成</div>
          <div class="item">性别</div>
          <div class="item">男</div>
          <div class="item">年龄</div>
          <div class="item">68</div>
          <div class="item">生日</div>
          <div class="item">1952-08-06</div>
          <div class="item">身份证</div>
          <div class="item">411503195208060971</div>
          <div class="item">婚姻状态</div>
          <div class="item">已婚</div>
          <div class="item">联系方式</div>
          <div class="item">138 4567 7890</div>
          <div class="item">宗教信仰</div>
          <div class="item">无宗教信仰</div>
          <div class="item">经济来源</div>
          <div class="item">子女赡养</div>
          <div class="item">老人类型</div>
          <div class="item">低保老人</div>
          <div class="item">医保类型</div>
          <div class="item">城镇居民医疗保险</div>
          <div class="item">医保卡号</div>
          <div class="item">0987847975</div>
          <div class="item">户籍地址</div>
          <div class="item item-spcial-1">
            河南省信阳市平桥区恒大名都1幢1019室
          </div>
          <div class="item">居住地址</div>
          <div class="item item-spcial-2">
            河南省信阳市平桥区恒大名都1幢1019室
          </div>
        </div>
        <div class="info-title">健康状况</div>
        <div class="basicInfo healthInfo">
          <div class="item">体温</div>
          <div class="item">36.8℃</div>
          <div class="item">血压</div>
          <div class="item">160mmHg，100mmHg</div>
          <div class="item">康复训练</div>
          <div class="item">无</div>
          <div class="item">疾病</div>
          <div class="item">无</div>
          <div class="item">介护等级</div>
          <div class="item">介助型</div>
          <div class="item">听力</div>
          <div class="item">正常</div>
          <div class="item">视力</div>
          <div class="item">正常</div>
          <div class="item">体重</div>
          <div class="item">68kg</div>
          <div class="item">传染病</div>
          <div class="item">无</div>
          <div class="item">疾病史</div>
          <div class="item">高血压、糖尿病</div>
          <div class="item">遗传病</div>
          <div class="item">无</div>
          <div class="item">过敏史</div>
          <div class="item">无</div>
        </div>
        <div class="info-title">床位信息</div>
        <div class="basicInfo bedInfo">
          <div class="item">床位编号</div>
          <div class="item">101房01床</div>
          <div class="item">护理类型</div>
          <div class="item">介助型</div>
          <div class="item">入住时间</div>
          <div class="item">2020-07-01</div>
          <div class="item">离住时间</div>
          <div class="item">2020-12-01</div>
          <div class="item">床位价格</div>
          <div class="item">500元/月</div>
          <div class="item">餐费价格</div>
          <div class="item">800元/月</div>
          <div class="item">护理价格</div>
          <div class="item">1500元/月</div>
          <div class="item">床位押金</div>
          <div class="item">1000元</div>
          <div class="item">设备编号</div>
          <div class="item">JZ1090908786785</div>
          <div class="item">护理人员</div>
          <div class="item">张玲玲</div>
          <div class="item">预交金额</div>
          <div class="item">10000.00元</div>
          <div class="item">预警金额</div>
          <div class="item">500.00元</div>
        </div>
        <div class="info-title">家属信息</div>
        <div class="basicInfo familyInfo">
          <div class="item">姓名</div>
          <div class="item">简书成</div>
          <div class="item">性别</div>
          <div class="item">男</div>
          <div class="item">与老人关系</div>
          <div class="item">子女</div>
          <div class="item">联系方式</div>
          <div class="item">138 7869 8729</div>
          <div class="item">身份证</div>
          <div class="item item-spcial-1">411503195208060971</div>
          <div class="item">居住地址</div>
          <div class="item item-spcial-2">
            河南省信阳市平桥区恒大名都1幢1019室
          </div>
        </div>
      </div>
    </el-dialog>
    <el-dialog
      title="报警信息"
      :visible.sync="dialogAlertVisible"
      width="100%"
      :before-close="closeAlertDialog"
      :show-close="false"
      :close-on-click-modal="false"
      custom-class="alertForm"
      class="dialogalertForm"
    >
      <div class="dialog-main">
        <div class="item">
          <div class="item-header">
            <i class="el-icon-message-solid" :class="{ active: light }"></i>
            <span>报警信息</span>
          </div>
          <div class="item-main">
            <p>
              <span>床位编号：</span>
              <b>1号楼1楼101床</b>
            </p>
            <p>
              <span>护理类型：</span>
              <b>介助型</b>
            </p>
            <p>
              <span>老人姓名：</span>
              <b>杨德洪</b>
            </p>
            <p>
              <span>老人性别：</span>
              <b>女</b>
            </p>
            <p>
              <span>老人年龄：</span>
              <b>78</b>
            </p>
            <p>
              <span>报警类型：</span>
              <b class="alertInfo">离床报警</b>
            </p>
          </div>
          <div class="item-footer">
            <el-button type="danger" class="doBtn">立即处理</el-button>
          </div>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
  import { baseURL } from "@/config/settings";
  export default {
    name: "Index",
    components: {},
    data() {
      return {
        status: "",
        pageNo: 1,
        pageSize: 10,
        url: baseURL,
        layout: "total, prev, pager, next, jumper",
        total: 0,
        webSocket: null,
        light: false,
        background: true,
        dialogVisible: false,
        dialogAlertVisible: false,
        selectArr: [0, 1, 2, 3, 4, 5],
        icon: [
          "bed",
          "procedures",
          "procedures",
          "bell",
          "minus-circle",
          "minus-circle",
        ],
        backgroundColor: [
          "colorType0",
          "colorType1",
          "colorType2",
          "colorType3",
          "colorType4",
          "colorType5",
          "colorType6",
        ],
        tags: [
          { name: "床上有人(100)", color: "#00BF11", id: 0 },
          { name: "暂时离床(5)", color: "#E0C720", id: 1 },
          { name: "离床未归(8)", color: "#E5362A", id: 2 },
          { name: "呼叫请求(2)", color: "#C400D2", id: 3 },
          { name: "设备离线(2)", color: "#666666", id: 4 },
          { name: "设备未绑定(11)", color: "#999999", id: 5 },
        ],
        formData: {},
        selectForm: {},
      };
    },
    created() {},
    beforeDestroy() {},
    mounted() {
      // setInterval(() => {
      //   this.light = !this.light;
      // }, 500);
      // console.log(baseURL);
      this.init();
    },
    methods: {
      init() {
        const wsuri = "ws://39.98.179.212:9999";
        this.webSocket = new WebSocket(wsuri);
        this.webSocket.onmessage = this.onmessage;
        this.webSocket.onopen = this.onopen;
        this.webSocket.onerror = this.onerror;
        this.webSocket.onclose = this.onclose;
      },
      onopen() {
        this.status = "成功";
        console.log(this.status);
      },
      onerror() {
        this.status = "失败";
        console.log(this.status);
        // this.initWebSocket();
      },
      onmessage({ data }) {
        //截掉测试webSocket地址广告
        // this.data.push(data.substring(0, data.length - 66));
        let msgData = JSON.parse(data);
        console.log(msgData);
        // this.light = !this.light;
      },
      send(Data) {
        this.webSocket.send(Data);
      },
      onclose(e) {
        this.status = "断开";
      },
      handleFilter(e) {
        let id = e.currentTarget.dataset.id;
        if (this.selectArr.indexOf(parseInt(id)) === -1) {
          this.selectArr.push(parseInt(id));
        }
      },
      handleClose(id) {
        if (this.selectArr.indexOf(parseInt(id)) !== -1) {
          this.selectArr.splice(this.selectArr.indexOf(parseInt(id)), 1);
        }
      },
      handleCardInfo() {
        this.dialogVisible = true;
      },
      closeDialog() {
        this.dialogVisible = false;
      },
      handleSizeChange(val) {
        this.pageSize = val;
        // this.fetchData();
      },
      handleCurrentChange(val) {
        this.pageNo = val;
        // this.fetchData();
      },
      closeAlertDialog() {
        this.dialogAlertVisible = false;
      },
    },
  };
</script>
<style lang="scss" scoped>
  .index-container {
    width: 100%;
    padding: 0 30px !important;
    margin: 0 !important;
    box-sizing: border-box;
    background: #fff !important;
    .main-header {
      padding-top: 4px;
      margin-bottom: 24px;
      .search {
        display: flex;
        .search-title {
          flex: 0 0 48px;
          width: 48px;
          line-height: 36px;
          font-size: 16px;
          color: #333;
        }
      }
      .el-tag {
        background: none;
        border: 1px solid #dddfe7;
        color: #333;
        line-height: 34px;
        &.active {
          border: none;
          color: #fff;
          line-height: 36px;
        }
      }
      .el-tag--medium {
        height: 36px;
        cursor: pointer;
        font-size: 14px;
        ::v-deep {
          .el-tag__close {
            color: #fff;
          }
        }
      }
    }
    .el-card {
      margin-bottom: 30px;
      border-radius: 8px;
      cursor: pointer;
      ::v-deep {
        .el-card__header {
          height: 48px;
          line-height: 48px;
          padding: 0 12px;
          background: #18ba39;
        }
        .el-card__body {
          padding: 12px;
          .item {
            margin-bottom: 10px;
            line-height: 24px;
            font-size: 16px;
            color: #999;
            span {
              width: 50%;
              display: inline-block;
              overflow: hidden;
              white-space: nowrap;
              text-overflow: ellipsis;
              color: #333;
              font-size: 16px;
              vertical-align: middle;
            }
          }
        }
      }
    }
    .el-card.colorType0 {
      ::v-deep {
        .el-card__header {
          background: #18ba39;
        }
      }
    }
    .el-card.colorType1 {
      ::v-deep {
        .el-card__header {
          background: #e0c720;
        }
      }
    }
    .el-card.colorType2 {
      ::v-deep {
        .el-card__header {
          background: #e5362a;
        }
      }
    }
    .el-card.colorType3 {
      ::v-deep {
        .el-card__header {
          background: #c400d2;
        }
      }
    }
    .el-card.colorType4 {
      ::v-deep {
        .el-card__header {
          background: #666666;
        }
      }
    }
    .el-card.colorType5 {
      ::v-deep {
        .el-card__header {
          background: #999999;
        }
      }
    }
    .header {
      position: relative;
      color: #fff;
      .header_icon {
        position: absolute;
        left: 0px;
        top: 50%;
        font-size: 24px;
        transform: translateY(-50%);
      }
      span {
        display: block;
        text-align: center;
        font-size: 18px;
      }
    }
  }
  .dialogForm {
    ::v-deep {
      .el-dialog {
        border-radius: 12px;
        .el-dialog__body {
          padding-top: 12px;
        }
      }
    }
    .dialog-main {
      .info-title {
        margin-bottom: 12px;
        line-height: 30px;
        font-size: 20px;
        color: #2279ff;
        font-weight: 400;
      }
      .basicInfo {
        display: grid;
        grid-template-columns: 9% 16% 9% 16% 9% 16% 9% 16%;
        grid-template-rows: repeat(4, 40px);
        margin-bottom: 12px;
        border-left: 1px solid #e1e1e1;
        border-bottom: 1px solid #e1e1e1;
        .item {
          line-height: 40px;
          border-right: 1px solid #e1e1e1;
          border-top: 1px solid #e1e1e1;
          text-align: center;
          &:nth-child(even) {
            color: #333;
            font-size: 16px;
          }
          &:nth-child(odd) {
            color: #999;
            font-size: 16px;
          }
        }
        .item-spcial-1 {
          grid-column-start: 2;
          grid-column-end: 5;
        }
        .item-spcial-2 {
          grid-column-start: 6;
          grid-column-end: 9;
        }
      }
      .healthInfo {
        grid-template-rows: repeat(3, 40px);
      }
      .bedInfo {
        grid-template-rows: repeat(3, 40px);
      }
      .familyInfo {
        grid-template-rows: repeat(2, 40px);
      }
    }
  }
  .dialogalertForm {
    ::v-deep {
      .alertForm {
        background: rgba($color: #000000, $alpha: 0);
        box-shadow: none;
        .el-dialog__header {
          display: none;
        }
        .el-dialog__body {
          border: none;
          text-align: center;
          .item {
            display: inline-block;
            width: 245px;
            height: 332px;
            padding: 16px 24px;
            background: #ffffff;
            border-radius: 8px;
            box-sizing: border-box;
            text-align: left;
            .item-header {
              margin-bottom: 16px;
              text-align: center;
              font-size: 20px;
              color: #e5362a;
              .el-icon-message-solid {
                font-size: 24px;
                color: #e5362a;
                vertical-align: middle;
                transition: 0.5s all;
                &.active {
                  color: #2279ff;
                }
              }
              span {
                padding-left: 8px;
                vertical-align: middle;
              }
            }
            .item-main {
              p {
                margin-bottom: 12px;
                font-family: PingFangSC-Regular, PingFang SC;
                line-height: 24px;
                font-size: 16px;
                color: #999;
                b {
                  font-size: 16px;
                  font-weight: normal;
                  color: #333;
                  &.alertInfo {
                    color: #ff4d50;
                  }
                }
              }
            }
            .item-footer {
              .doBtn {
                width: 100%;
                height: 44px;
                padding: 0px;
                line-height: 44px;
                background: #e5362a;
                font-size: 16px;
              }
            }
          }
        }
      }
    }
  }
</style>
